Skip to content

docs: wake-on-text architecture for idle-shutdown bootstrap#71

Open
maxberta-ait wants to merge 1 commit into
inceptionstack:mainfrom
maxberta-ait:docs/wake-on-text-architecture
Open

docs: wake-on-text architecture for idle-shutdown bootstrap#71
maxberta-ait wants to merge 1 commit into
inceptionstack:mainfrom
maxberta-ait:docs/wake-on-text-architecture

Conversation

@maxberta-ait

Copy link
Copy Markdown

Add comprehensive documentation for the elegant wake-on-text design:

  • Random sleep message on stop (no tokens, no links)
  • Telegram webhook intercepts messages while EC2 sleeps
  • Any message from authorized user wakes instance instantly
  • Dedup protection via message_id tracking
  • Message queueing: 503 return keeps messages for OpenClaw to process on boot

Update Lambda implementations:

  • notify-lambda: Send sleep message + setWebhook for wake-on-text
  • webhook-lambda: Intercept Telegram messages, validate secret, wake if stopped

Key design details documented:

  • Stale-event guard (verify EC2 state before webhook)
  • Webhook secret validation (prevent unauthorized wakes)
  • 503 retry return (preserve message queue)
  • Dedup checks (prevent duplicate wakes)
  • User authorization (ALLOWED_USERS)

Cost: ~$0/month (EventBridge free, Lambda free tier covers it)

Add comprehensive documentation for the elegant wake-on-text design:
- Random sleep message on stop (no tokens, no links)
- Telegram webhook intercepts messages while EC2 sleeps
- Any message from authorized user wakes instance instantly
- Dedup protection via message_id tracking
- Message queueing: 503 return keeps messages for OpenClaw to process on boot

Update Lambda implementations:
- notify-lambda: Send sleep message + setWebhook for wake-on-text
- webhook-lambda: Intercept Telegram messages, validate secret, wake if stopped

Key design details documented:
- Stale-event guard (verify EC2 state before webhook)
- Webhook secret validation (prevent unauthorized wakes)
- 503 retry return (preserve message queue)
- Dedup checks (prevent duplicate wakes)
- User authorization (ALLOWED_USERS)

Cost: ~$0/month (EventBridge free, Lambda free tier covers it)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant